package com.mars.diancan.service;

import com.mars.diancan.dto.OrderDTO;
import com.mars.diancan.pojo.OrderMaster;
import com.mars.diancan.pojo.ProductInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

import java.util.List;

/**
 * 订单service接口
 * @author MARS
 * @date 2018/6/21
 */

public interface OrderService {

    /**
     * 创建订单
     */
    OrderDTO create(OrderDTO orderDTO);

    /**
     * 查询单个订单
     */
    OrderDTO findOne(String orderId);

    /**
     * 查询订单列表,查询单个人的订单列表
     */
    Page<OrderDTO> findList(String buyerOpenid,Pageable pageable);

    /**
     * 取消订单
     */
    OrderDTO cancel(OrderDTO orderDTO);

    /**
     * 完结订单
     */
    OrderDTO finish(OrderDTO orderDTO);

    /**
     * 支付订单
     */
    OrderDTO paid(OrderDTO orderDTO);

    /**
     * 查询所有人的订单列表
     */
    Page<OrderDTO> findList(Pageable pageable);

}
